const microApps = [
  {
    // 名称需要跟子应用包名中的name保持一致
    name: "main-screen",
    // 子应用进入的地址，线上环境需要跟子应用的vite.config.js中的base保持一致
    entry: import.meta.env.VITE_APP_ENTRY_SCREEN,
    // 
    activeRule: "/screen",
  },
  {
    name: "acl",
    entry: import.meta.env.VITE_APP_ENTRY_ACL,
    activeRule: "/acl/",
  }
];

const apps = microApps.map((app) => {
  return {
    ...app,
    container: "#micro-content",
    props: {
      routerBase: app.activeRule, // 下发基础路由(子应用接收的路由前缀)
    },
    loader(loading: boolean) {
      console.log("loading", loading);
    },
  };
});

export default apps;
